package com.sjsu.CMPE226.normalized.jdbc.data;

import java.util.Collection;

public class Station {
	private String stationId;
	private String secondaryStationId;
	private String stationName;
	private String status;
	private String state;
	private String country;
	private double latitude;
	private double longitude;
	private float elevation;
	private int networkId;
	private int wimsId;
	private int primaryProviderId;
	private int secondaryProviderId;
	private int tertiaryProviderId;

	private Collection<Observation> observations;

	public Station() {

	}

	/**
	 * @return the stationId
	 */
	public String getStationId() {
		return stationId;
	}

	/**
	 * @param stationId
	 *            the stationId to set
	 */
	public void setStationId(String stationId) {
		this.stationId = stationId;
	}

	/**
	 * @return the secondaryStationId
	 */
	public String getSecondaryStationId() {
		return secondaryStationId;
	}

	/**
	 * @param secondaryStationId
	 *            the secondaryStationId to set
	 */
	public void setSecondaryStationId(String secondaryStationId) {
		this.secondaryStationId = secondaryStationId;
	}

	/**
	 * @return the stationName
	 */
	public String getStationName() {
		return stationName;
	}

	/**
	 * @param stationName
	 *            the stationName to set
	 */
	public void setStationName(String stationName) {
		this.stationName = stationName;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status
	 *            the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state
	 *            the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * @return the country
	 */
	public String getCountry() {
		return country;
	}

	/**
	 * @param country
	 *            the country to set
	 */
	public void setCountry(String country) {
		this.country = country;
	}

	/**
	 * @return the latitude
	 */
	public double getLatitude() {
		return latitude;
	}

	/**
	 * @param latitude
	 *            the latitude to set
	 */
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	/**
	 * @return the longitude
	 */
	public double getLongitude() {
		return longitude;
	}

	/**
	 * @param longitude
	 *            the longitude to set
	 */
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	/**
	 * @return the elevation
	 */
	public float getElevation() {
		return elevation;
	}

	/**
	 * @param elevation
	 *            the elevation to set
	 */
	public void setElevation(float elevation) {
		this.elevation = elevation;
	}

	/**
	 * @return the netwrokId
	 */
	public int getNetworkId() {
		return networkId;
	}

	/**
	 * @param netwrokId
	 *            the netwrokId to set
	 */
	public void setNetworkId(int networkId) {
		this.networkId = networkId;
	}

	/**
	 * @return the wimsId
	 */
	public int getWimsId() {
		return wimsId;
	}

	/**
	 * @param wimsId
	 *            the wimsId to set
	 */
	public void setWimsId(int wimsId) {
		this.wimsId = wimsId;
	}

	/**
	 * @return the primaryProviderId
	 */
	public int getPrimaryProviderId() {
		return primaryProviderId;
	}

	/**
	 * @param primaryProviderId
	 *            the primaryProviderId to set
	 */
	public void setPrimaryProviderId(int primaryProviderId) {
		this.primaryProviderId = primaryProviderId;
	}

	/**
	 * @return the secondaryProviderId
	 */
	public int getSecondaryProviderId() {
		return secondaryProviderId;
	}

	/**
	 * @param secondaryProviderId
	 *            the secondaryProviderId to set
	 */
	public void setSecondaryProviderId(int secondaryProviderId) {
		this.secondaryProviderId = secondaryProviderId;
	}

	/**
	 * @return the tertiaryProviderId
	 */
	public int getTertiaryProviderId() {
		return tertiaryProviderId;
	}

	/**
	 * @param tertiaryProviderId
	 *            the tertiaryProviderId to set
	 */
	public void setTertiaryProviderId(int tertiaryProviderId) {
		this.tertiaryProviderId = tertiaryProviderId;
	}

	/**
	 * @return the observations
	 */
	public Collection<Observation> getObservations() {
		return observations;
	}

	/**
	 * @param observations
	 *            the observations to set
	 */
	public void setObservations(Collection<Observation> observations) {
		this.observations = observations;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((country == null) ? 0 : country.hashCode());
		result = prime * result + Float.floatToIntBits(elevation);
		long temp;
		temp = Double.doubleToLongBits(latitude);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(longitude);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + networkId;
		result = prime * result
				+ ((observations == null) ? 0 : observations.hashCode());
		result = prime * result + primaryProviderId;
		result = prime * result + secondaryProviderId;
		result = prime
				* result
				+ ((secondaryStationId == null) ? 0 : secondaryStationId
						.hashCode());
		result = prime * result + ((state == null) ? 0 : state.hashCode());
		result = prime * result
				+ ((stationId == null) ? 0 : stationId.hashCode());
		result = prime * result
				+ ((stationName == null) ? 0 : stationName.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + tertiaryProviderId;
		result = prime * result + wimsId;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Station other = (Station) obj;
		if (country == null) {
			if (other.country != null)
				return false;
		} else if (!country.equals(other.country))
			return false;
		if (Float.floatToIntBits(elevation) != Float
				.floatToIntBits(other.elevation))
			return false;
		if (Double.doubleToLongBits(latitude) != Double
				.doubleToLongBits(other.latitude))
			return false;
		if (Double.doubleToLongBits(longitude) != Double
				.doubleToLongBits(other.longitude))
			return false;
		if (networkId != other.networkId)
			return false;
		if (observations == null) {
			if (other.observations != null)
				return false;
		} else if (!observations.equals(other.observations))
			return false;
		if (primaryProviderId != other.primaryProviderId)
			return false;
		if (secondaryProviderId != other.secondaryProviderId)
			return false;
		if (secondaryStationId == null) {
			if (other.secondaryStationId != null)
				return false;
		} else if (!secondaryStationId.equals(other.secondaryStationId))
			return false;
		if (state == null) {
			if (other.state != null)
				return false;
		} else if (!state.equals(other.state))
			return false;
		if (stationId == null) {
			if (other.stationId != null)
				return false;
		} else if (!stationId.equals(other.stationId))
			return false;
		if (stationName == null) {
			if (other.stationName != null)
				return false;
		} else if (!stationName.equals(other.stationName))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (tertiaryProviderId != other.tertiaryProviderId)
			return false;
		if (wimsId != other.wimsId)
			return false;
		return true;
	}

}
